package com.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

public interface ManagerDao {

    @Select("select * from rbac_manager where id = #{id}")
    Map<Object, Object> findOne(int id);

    @Select("select * from rbac_manager")
    List<Map<Object, Object>> findAll();

    @Insert("insert into rbac_manager (account,password,status) values(#{account},#{password},#{status})")
    Integer addOne(Map<Object, Object> map);

    @Delete("delete from rbac_manager where id = #{id}")
    Integer deleteOne(int id);

    @Update("update rbac_manager set account = #{account} where id = #{id}")
    Integer update(Map<Object, Object> map);
}
